package com.dosen.api.third.party.register.param;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @version V1.0
 * @author: guangcheng
 * @date: 2022/6/3 11:10
 * @description:
 */
@NoArgsConstructor
@Data
public class SimpleSyncDTO {

    /**
     * revision
     */
    @JSONField(name = "revision")
    public String revision;
    /**
     * prune
     */
    @JSONField(name = "prune")
    public Boolean prune;
    /**
     * dryRun
     */
    @JSONField(name = "dryRun")
    public Boolean dryRun;
    /**
     * strategy
     */
    @JSONField(name = "strategy")
    public StrategyDTO strategy;
    /**
     * resources
     */
    @JSONField(name = "resources")
    public Object resources;
    /**
     * syncOptions
     */
    @JSONField(name = "syncOptions")
    public SyncOptionsDTO syncOptions;

    /**
     * StrategyDTO
     */
    @NoArgsConstructor
    @Data
    public static class StrategyDTO {
        /**
         * hook
         */
        @JSONField(name = "hook")
        public HookDTO hook;

        /**
         * HookDTO
         */
        @NoArgsConstructor
        @Data
        public static class HookDTO {
            /**
             * force
             */
            @JSONField(name = "force")
            public Boolean force;
        }
    }

    /**
     * SyncOptionsDTO
     */
    @NoArgsConstructor
    @Data
    public static class SyncOptionsDTO {
        /**
         * items
         */
        @JSONField(name = "items")
        public List<String> items;
    }
}

